    // 导航栏背景变色模块，三角形显示隐藏模块
    var mNavLi = document.querySelectorAll(".m-nav li");
    var triangle = document.querySelectorAll(".triangle");
    for (let i = 0; i < mNavLi.length; i++) {
        mNavLi[i].addEventListener('click',
            function () {
                for (let i = 0; i < mNavLi.length; i++) {
                    mNavLi[i].className = '';
                    triangle[i].style.display = 'none';
                }
                this.className = 'deepblack';
                let tri = this.querySelector('.triangle');
                tri.style.display = 'block';
            })
    }

    // 副导航栏变色模块
    var mSubtop = document.querySelectorAll('.m-subtop li em');
    for (let i = 0; i < mSubtop.length; i++) {
        mSubtop[i].addEventListener('click',
            function () {
                for (let i = 0; i < mSubtop.length; i++) {
                    mSubtop[i].className = '';

                }
                this.className = 'bg';

            })
    }


    // 播放条的设置
    // 播放条的设置
    var isDown = false;
    var beforeW = 0;
    var nowleftx = 0;
    var playSroll = true;

    function fn(event) {

        nowleftx = (event.clientX - beforex) / 458 * 100 + parseInt(beforehi);
        console.log(nowleftx);
        if (parseInt(nowleftx) >= 100 && parseInt(nowleftx) < 0) {
            isDown = false;
        }
        if (parseInt(nowleftx) < 100 && parseInt(nowleftx) > 0 && isDown == true) {

            btnBox.style.width = nowleftx + '%';
        }


    }
    var beforex = 0;
    var btnBox = document.querySelector('.btn-box');
    var btn = btnBox.querySelector('.btn');
    btn.addEventListener('mousedown', function (event) {
        beforex = event.clientX;
        beforeW = btn.offsetLeft + 9;
        beforehi = btnBox.offsetWidth / 458 * 100;
        isDown = true;
        playSroll = false;
        window.addEventListener('mousemove', fn)

    })
    window.addEventListener('mouseup', function () {
        window.removeEventListener('mousemove', fn);
        isDown = false;
        audioObj.currentTime = nowleftx / 100 * (audioObj.duration);
        playSroll = true;
    })




    // 播放条里面的开始暂停设置
    var y = 0;
    var start = document.querySelector('.player-btns .start');

    function startclick(play) {
        if (play == 1) {
            start.setAttribute('style', 'background-position:-40px -165px');
            audioObj.play();
            y = 1;
        } else {
            if (y % 2 == 0 || y == 0) {
                start.setAttribute('style', 'background-position:-40px -165px');
                audioObj.play();
            } else {
                start.setAttribute('style', 'background-position:-40px -204px');
                audioObj.pause();

            }
            y++;
        }
    }
    start.addEventListener('click', startclick);

    // 播放条里面的锁
    var x = 0;
    var open = false;
    var key = document.querySelector('.icon-key');
    key.addEventListener('click', function () {
        if (x % 2 == 0 || x == 0) {
            key.setAttribute('style', 'background-position:-80px -400px');
            open = true;
        } else {
            key.setAttribute('style', 'background-position:-100px -380px');
            open = false;
        }
        x++
    })

    var hand = document.querySelector('.hand');
    var player = document.querySelector('.m-player');
    hand.addEventListener('mouseout', function () {
        if (open == true) {
            player.setAttribute('style', 'top:-7px');
        }


    })
    var totalkey = document.querySelector('.key');
    totalkey.addEventListener('mouseout', function () {
        console.log(555);
        console.log(open);
        if (open == true) {
            player.setAttribute('style', 'top:-7px');
            console.log(222);
        }


    })
    player.addEventListener('mouseover', function () {
        if (open == true) {
            player.setAttribute('style', 'top:-53px');
        }


    })

    function ajax(Requestname, requestWay, address, way, parameter) {

        Requestname.open(requestWay, 'http://localhost:3000' + address);
        if (requestWay == 'GET') {
            Requestname.send();
        } else {

            Requestname.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
            Requestname.send(parameter);
        }
        Requestname.onreadystatechange = function () {
            if (Requestname.readyState === 4) {
                //  判断响应状态码 200 404 403 500
                if (Requestname.status >= 200 && Requestname.status < 300) {
                    // 处理结果
                    // let focusImg = JSON.parse(xhr.response);
                    // console.log(focusImg);
                    // let art = focusImg.banners;
                    // console.log(art[0].imageUrl);
                    // focusImgOne.src = art[0].imageUrl;
                    way();
                } else {
                    return Requestname.status;
                }
            }

        }

    }